import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';

export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
      // 确保正确解析插件路径
      'medical-rich-text-editor': path.resolve(__dirname, '../dist')
    }
  },
  server: {
    port: 5173,
    open: true
  },
  css: {
    preprocessorOptions: {
      scss: {
        // 导入插件样式
        additionalData: `@import "medical-rich-text-editor/dist/medical-editor.css";`
      }
    }
  }
});